package chuishop.yiqimaicai.service.Impl;

import chuishop.yiqimaicai.mapper.SupplierMapper;
import chuishop.yiqimaicai.pojo.Supplier;
import chuishop.yiqimaicai.service.SupplierService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
//供应商表
public class SupplierServiceImpl implements SupplierService {
    @Autowired
    private SupplierMapper supplierMapper;

    @Override
    public List<Supplier> findSupplier() {
        return supplierMapper.findSupplier();
    }

    @Override
    public List<Supplier> selectSupplier(String input) {
        return supplierMapper.selectSupplier(input);
    }

    @Override
    public boolean addSupplier(Supplier supplier) {

        return supplierMapper.addSupplier(supplier)>0;

    }

    @Override
    public boolean deleteSupplier(String[] ids) {
        return supplierMapper.deleteSupplier(ids)>0;
    }

    @Override
    public boolean updateSupplier(Supplier supplier) {
        return supplierMapper.updateSupplier(supplier)>0;
    }
}
